<?php

class EventsController extends AppController{

	var $scaffold;

	function beforeFilter() {

		$this->Auth->allow('test');
		parent::beforeFilter();
	}

	function test(){
	}

	function display($sCategoryId = null, $sEventId = null){

		if($sEventId !== null){ // refactor: ugly but best for now
			echo $this->requestaction(
				'/event_dates/display/'.$sEventId,
				array('return'));
		}
		else{
			$sFilter = " category_id = '$sCategoryId' ";
			$this->set('aData', $this->Event->findAll($sFilter));
		}
	}


}


?>

